<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>练习2：创建Person函数</title>
	</head>
	<body>
		<div id="intro"></div>
		<script>
			function Person(){
				
			}
			Person.prototype.name="郎晓明";
			Person.prototype.age="38";
			Person.prototype.job="中国内地男演员、歌手";
			Person.prototype.address="中国北京海淀区";
			Person.prototype.intro=function(){
				var str="姓名："+this.name+"<br/>年龄："+this.age+"<br/>工作："+this.job+"<br>住址:"+this.address;
				document.getElementById("intro").innerHTML=str;
			}
//			Person.prototype.intro()
			var person1=new Person()
				person1.intro();

		</script>
	</body>
</html>
